
//author: create by SunJH
//时间: 2021/11/18 0018
//邮箱: 965989158@qq.com
//描述: 创建统一的appBar

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:quick_dev_plugin/utils/cache_image.dart';

appBar(String title,{ backButton = const BackButton(color: Colors.white),List<Widget>? actions}){
  return AppBar(

    // title位置：居中
    centerTitle: false,
    // 阴影高度：0
    elevation: 0,
    // 导航栏最左侧Widget：是否显示返回按钮
    leading: backButton,
    // 导航栏右侧List<Widget>
    actions: actions,
    // title文字和样式
    title: Text(
      title,
      style: const TextStyle(
        fontSize: 18,
        color: Colors.white,
        fontWeight: FontWeight.bold,
      ),
    ),
  );
}